package M;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86138
 * Date: 2024-05-28
 * Time: 14:48
 */
public class Cat extends Animal{


    static {
        System.out.println("静态 Animal");
    }

    {
        System.out.println("实例代码块");
    }

    public Cat(String name, int age){

        super(name,age);//调用了父类的构造方法
        System.out.println("构造 Cat");
    }

    public void bark(){

        System.out.println(this.name + "正在喵喵叫");
    }

}
